import React from 'react';
import {render} from 'react-dom';
import App from './containers/App';
import reducer from "./reducers"
import { createStore, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import createSagaMiddleware from 'redux-saga'
import mySaga from './actions/sagas'

const sagaMiddleware = createSagaMiddleware()

const store=createStore(
        reducer,
        applyMiddleware(sagaMiddleware)
    )

sagaMiddleware.run(mySaga)

render(
    <Provider store={store}>
        <App />
    </Provider>,
  document.getElementById('root')
);
